<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>fMRI Sandbox - the Buttons</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<h2>  The buttons section:</h2>

<h2> File :</a> </h2>

<h3> <a name="load">Load :</a> </h3>
Allows you to either load a single analyze format image
(consisting of one *.img and one *.hdr image) or alternatively a 4-D
dataset in x*y*z*t format (e.g. 96x48x40x150), which should be named idat. Additionally, you may load a sandbox experiment struct, containing arrays with predictor information (hemodynamics), onset information (onset) or trial information (intrial). These arrays have to be named according to the convention laid out above, otherwise the GUI will not be able to use them. Most convenient is it to put a 4D volume (idat) together with a predictor array (hemodynamics) and trial information (intrial) into one .mat file that can be loaded all at once.

<h3>  <a name="save">Save: </a></h3>
Save the state of your actual work to disk. This button saves the image data in its current state (idat) as well as the sandbox experiment struct into a file specified with a name you can choose. Should you not choose any name, it saves all the available variables into a file called subject.mat

<h3>  <a name="Please!">Please: </a></h3>
Once you click this button, a predefined sequence of events is called up, which is now part of the main Sandbox program, but will shortly be transferred into a config file.
Use this as a kind of batch function to get things done quicker and in a standardized way.

<h3> <a name="keep">KEEP DATA:</a></h3>
Keep the current data in memory for further calculations. Discard the
original data (only from memory, not from disk)

<h3>  <a name="Load Qnx">QNXLoad : </a></h3>
Allows you to load a .dgz file that was generated by the QNX state system that we use here to synchronize our experimental stimuli with the scanner environment.
To the right of the button, you find a selection field where you can select various predefined options. Feel free to write additonal import routines to add support for your own experiments.


<h3> Refresh </h3>
Sometimes sandbox gets stuck. This might actually help you to get things back in shape.

<h2> Trial :</a> </h2>

<h3> <a name="trialonly">All:</a></h3>
Select only those scans that were part of a trial. This is helpful if you
are using motion detection and control methods in animal experiments

<h3> None:</a></h3>
Unselect all trials. You might want to do this when you have selected a number of trials, but would rather like to start all over again

<h3> <a name="artrem">Remove Artefacts:</a></h3>
Select the artefacts to be removed with the slider (they are indicated
with a white +) and push the button to remove them. Take note that you
cannot undo the procedure without reloading the original image.

<h3> Keep:</a></h3>
Keep all selected trials, delete the remaining volumes. This gives you (in an ideal world) just the volumes that were part of a trial and are therefore (again, in an ideal world) motion-corrected.

<h3> <a name="deltrial">Delete Trials</a></h3>
Delete all selected trials, keep the remaining volumes. Use this function to remove trials that you have detected as faulty, if you do not want to delete single volumes e.g. in a case where the deletion of baseline volumes would lead to a distorted normalization

<h3>  <a name="movement">Movement</a></h3>
Use this button to display the amount of in-phase motion of the brain. This is especially useful for
awake animal experiments in high-field scanners, where there should not be motion in any other direction.

<h3>  <a name="DelVolume"> Delete Volume</a></h3>
Deletes the selected volume. Use this to get rid of clearly artifactual volumes the the detection algorithm did not find.

<h2>Brain:</a> </h2>

<h3> <a name="realign">Realign:</a></h3>
Realign the brain in y direction only. There is a selection of various realignment algorithms available.
3D-COM (3D- Center of Mass) is usually quite reliable, but your mileage may vary, please feel free to try the other options.
Corr (Correlation) tries to minimize the correlation between volumes, 2-D CoM uses single slices, DFT (Discrete Fourier Transform)
tries to match images in Fourier-Space.
Realignment is helpful in experiments in which the actual subject head movement is very limited but the impression
arises that movement takes place. This might be due to field
inhomogeneities and might be corrected with this realignment algorithm.

<h3>  <a name="corint">Correct intensity:</a></h3>
In case your image has an intensity gradient, it might be helpful to
homogenize the image intensity prior to brain extraction to improve
its results. Your mileage may vary

<h3>  <a name="lensfilt">Apply Lens Filter</a></h3>
Use a lens filter, if your image contains a lot of tissue around the
brain that the brain extraction algorithm cannot get rid of. This reduces
the image intensity outside of the brain and enhances the image intensity
inside the brain. Use the slider to determine the strength of the
filtering.

<h3>  <a name="extrbrain">Extract:</a></h3>
This serves to strip a brain of surrounding tissue. The slider determines
the extent of the tissue removal. Once you are set, press the button to
do the actual extraction and keep the extracted image

<h3><a name="bounding">Crop</a></h3>
This removes all the empty space around the brain, thereby reducing
the image size in memory and on disk. This greatly speeds up later
processing steps, but generates new images that might not be compatible
with other images from a different scanning session

<h3><a name="padding">Pad</a></h3>
Padding takes images that have been shrunk with bounding and pads them
with empty space on all sides to make concatenation between scans
possible. It takes the smallest one of a series of different volume sizes
that can be changed in the scripts by the user.


<h2>Normalize:</a> </h2>

<h3>  <a name="normalize">Volumes:</a></h3>
Use this function to normalize the average image intensity of every scan to the global mean
of all scans. This reduces variance due to field or shimming changes
during a scanning session or between sessions, but does decrease the signal of interest if
the perfusion in large parts of the brain changes due to the stimulus.

<h3> <a name="ScanNorm">Scans:</a></h3>
Due to shim and field changes, different scans may have a different baseline value for every voxel.
This function calculates the mean value of every voxel during every scan, and normalizes
this to the mean of all scans that are to be analyzed.

<h3> <a name="TrialNorm">Trials:</a></h3>
Due to motion-induced field changes within a scan, different trials may have a different baseline value for every voxel.
This function calculates the mean value of every voxel during every trial, and normalizes
this to the mean of all scans that are to be analyzed.
The drawback is that it will also reduce the difference that there may exist between different trials.

<h3> <a name="BaseNorm">Baseline:</a></h3>
Calculates the mean value of every baseline voxel during every trial, and normalizes
the trials accordingly. It assumes that the first regressor is modelled to give you a baseline estimate.
Avoid this if you don't have a baseline regressor or if your baseline is very short (e.g. 1 volume) or contains artefacts,
as this would lead to a weird distortion of the temporal course of the data.

<h3> <a name="OutlierRemoval"> Remove outliers: </a></h3>
Removes outlier values from the original image data. Sandbox converts all image input data into int16 format.
In the course of the process, values that happen to be greater than 32767 are truncated and set to 32767.
This function removes values that are far above the image mean or below zero from the image data.
This is sometimes helpful if the normalization procedure induced strange values, but your mileage may vary. Use with caution.

<h3><a name="ssmooth">Spatial Smooth:</a></h3>
Spatially smooth the image with a smoothing filter determined by the
slider value. This is most useful for improving the results of functional
imaging data. A value of 2 voxels gives good results in general. It uses an optimized routine from the <a href ="http://chronux.org/"> chronux project</a>.
Depending on the size of your dataset, it may take up to several minutes, though, be warned!
<br>Use the slider to determine the value, use the button to start
the smoothing process

<h2>Map:</a> </h2>

<h3><a name="dispmap">Display</a></h3>
Displays a statistical map overlaid on the brain, if you have loaded at
least one hemodynamic predictor. This is calculated on the fly just for the displayed sections.
The calculation omits voxels with an intensity value that is smaller than a third of the average brain intensity,
thereby reducing the calculation time. Typically, the calculation takes about a second, more for larger datasets.
Once a section has been displayed, the values are stored, speeding up the calculation if other sections sharing
the same voxels are viewed.

<h3><a name="pred">Predictor:</a></h3>
Choose one of the predictors you have predefined and loaded into memory.
There is currently a limit of 20 predictors that could be used at the same time.

<h3><a name="model">Model:</a></h3>
Chose the statistical model that best fits your hypotheses. Correlation
is fastest for a quick preview of what you get from applying different
preprocessing steps. GLM is the standard algorithm established by SPM but the version here
does not correct for multiple comparisons. Robust regression uses a
different method that is less susceptible to outliers, but still does not correct for multiple comparisons.

<h3>Map Threshold:</h3>
Use the <a name="corrslid">slider</a> to find a correlation and probability threshold that the
maps that you see overlaid on the images are just random noise.
Negative correlation values are overlaid in blue on the images, positive
correlation values in red.

<h3><a name="clusthr">Cluster threshold</a></h3>
Use this <a name="clusslid">slider </a>to determine of how many voxels clusters should consist at least in order to be displayed.

<h3><a name="calmap">Calculate Map</a></h3>
Calculate a map for the selected statistical method.
Be warned, this can take several minutes depending on the selected method (Correlation is fastest, GLM is slowest).

<h3>  Z-score map</a></h3>
Calculates a Z-score map of your data. Click this button again and you are back to your brain:)


<h3>  SelecTrialdisp</a></h3>
Displays the statistics for the selected trial only.

<h3>  Trial Timecourse</a></h3>
Displays the timecourses of all trials and their mean overlaid on it to the right of the button.

<h3>  ROI/Cluster</a></h3>
Switches between ROI and cluster timecourse display.


<h3><a name="ROI">ROI size</a></h3>
Use this <a name="roislid">slider </a>to determine how big the green ROI should be.


<h2>Manipulate:</a> </h2>

<h3>  <a name="denoise">Denoise Images:</a></h3>
This serves to remove noise from outside the image and is helpful to
limit image information that is not necessary for statistics calculations
It also helps to prepare the brain extraction process, sometimes
Use the slider to determine the amount of noise to remove, push the
button to do the removal

<h3>Shift HRF:</h3>
Use the slider to shift the predictor timecourse by fractions of one volume forward or back and calculate the model you have selected.
This might come in handy if there is some weird kind of offset between stimulus and scanner. Use the button to reset the shift to zero.

<h3>Smooth HRF:</h3>
Smoothes your HRF predictor in cases where there might be some jitter that is unaccounted for. I'm not sure if this helps, though...

<h3>  AddBaseVol</a></h3>
Adds one more baseline volume to your trials.

<h3>  Hemodynamics</a></h3>
Writes a new hemodynamics file from the onsets you specified. This is useful if you just have the onsets, but not the expected hemodynamic response. It assumes a stimulus onset in the middle of the specified volume and does not correct for slice timing, though.

<h3>  <a name="tsmooth">Temporal Smooth:</a></h3>
Temporally smooothing the image reduces some of the noise that occurs
during functional imaging and thereby improves statistical results
somewhat.
<br>Use the slider to determine the value, use the button to start
the smoothing process


<h2>General:</a> </h2>


<h3>  Help:</h3>
well, somehow you made it here, didn't you?

<h3>  Undo:</h3>
Sometimes, the Undo button even works! Incredible, isn't it?

<h3>  <a name="col">Color:</a></h3>
Select different colormaps for the images. This is sometimes useful to inspect your data for artefacts.


<h3>  Write Mean Brain</a></h3>
Writes the mean of all volumes to disk as an analyze image.

<h3>  Write Selected</a></h3>
Writes just the currently selected volume to disk as analyze image


<h3>  FlipVol</a></h3>
Flips the volumes in the selected dimension. I included this because I could not find it anywhere else...


<h2>Information:</a> </h2>


Here you see the current header information. Should you wish to change the voxel size, enter the new values here.


</body>

</html>
